home *** CD-ROM | disk | FTP | other *** search
/ How Would You Survive? / How Would You Survive (1995)(Grolier)[Mac-PC].iso / mac / SHARED.DIR / 01952_Script_THEATRE BUTTONS < prev    next >
Text File  |  1995-09-13  |  9KB  |  296 lines

  1. Global gTBtn1, gTBtn2, gTBtn3, gTBtn4, gTBtn5, gLastMarker, gExit, gHelp, gWhichMovieNo, gwhichBilling, gNewMarker, gWhatMovie,ghowlong
  2.  
  3. --on birth me , theSprite , theNCast, theSound, theFunction, theCursor, theRolloverFunction
  4.  
  5. on TheatreSetUp1
  6.   set ScriptNumber = the number of cast "aBiStableButton"
  7.   set gTBtn1 = birth(script ScriptNumber, 5, 24, "FeatureButSplClk.AIFF", "PlayMovie1", "ProjectorCursor", "TheatreBilling1")
  8.   set gExit = birth(script "aTheatreButton", 14, 47, "FeatureButSplClk.AIFF", "PreviousM", "HandCursor")
  9.   set gHelp = birth(script "aTheatreButton", 13, 44, "FeatureButSplClk.AIFF", "TheatreHelp", "HandCursor")
  10.   puppetsprite 17, true
  11.   set gwhichBilling = the castnum of sprite 17
  12.   set the castnum of sprite 17 = (gwhichBilling + gWhichMovieNo)
  13.   updatestage
  14.   sound stop 4
  15. end
  16.  
  17. on TheatreSetUp2
  18.   set ScriptNumber = the number of cast "aBiStableButton"
  19.   set gTBtn1 = birth(script ScriptNumber, 5, 24, "FeatureButSplClk.AIFF", "PlayMovie1", "ProjectorCursor", "TheatreBilling1")
  20.   set gTBtn2 = birth(script ScriptNumber, 6, 27, "FeatureButSplClk.AIFF", "PlayMovie2", "ProjectorCursor", "TheatreBilling2")
  21.   set gExit = birth(script "aTheatreButton", 14, 47, "FeatureButSplClk.AIFF", "PreviousM", "HandCursor")
  22.   set gHelp = birth(script "aTheatreButton", 13, 44, "FeatureButSplClk.AIFF", "TheatreHelp", "HandCursor")
  23.   puppetsprite 17, true
  24.   set gwhichBilling = the castnum of sprite 17
  25.   set the castnum of sprite 17 = (gwhichBilling + gWhichMovieNo)
  26.   updatestage
  27.   sound stop 4
  28. end
  29.  
  30. on TheatreSetUp3
  31.   set ScriptNumber = the number of cast "aBiStableButton"
  32.   set gTBtn1 = birth(script ScriptNumber, 5, 24, "FeatureButSplClk.AIFF", "PlayMovie1", "ProjectorCursor", "TheatreBilling1")
  33.   set gTBtn2 = birth(script ScriptNumber, 6, 27, "FeatureButSplClk.AIFF", "PlayMovie2", "ProjectorCursor", "TheatreBilling2")
  34.   set gTBtn3 = birth(script ScriptNumber, 7, 30, "FeatureButSplClk.AIFF", "PlayMovie3", "ProjectorCursor", "TheatreBilling3")
  35.   set gExit = birth(script "aTheatreButton", 14, 47, "FeatureButSplClk.AIFF", "PreviousM", "HandCursor")
  36.   set gHelp = birth(script "aTheatreButton", 13, 44, "FeatureButSplClk.AIFF", "TheatreHelp", "HandCursor")
  37.   puppetsprite 17, true
  38.   set gwhichBilling = the castnum of sprite 17
  39.   set the castnum of sprite 17 = (gwhichBilling + gWhichMovieNo)
  40.   updatestage
  41.   sound stop 4
  42. end
  43.  
  44. on TheatreSetUp4
  45.   set ScriptNumber = the number of cast "aBiStableButton"
  46.   set gTBtn1 = birth(script ScriptNumber, 5, 24, "FeatureButSplClk.AIFF", "PlayMovie1", "ProjectorCursor", "TheatreBilling1")
  47.   set gTBtn2 = birth(script ScriptNumber, 6, 27, "FeatureButSplClk.AIFF", "PlayMovie2", "ProjectorCursor", "TheatreBilling2")
  48.   set gTBtn3 = birth(script ScriptNumber, 7, 30, "FeatureButSplClk.AIFF", "PlayMovie3", "ProjectorCursor", "TheatreBilling3")
  49.   set gTBtn4 = birth(script ScriptNumber, 8, 33, "FeatureButSplClk.AIFF", "PlayMovie4", "ProjectorCursor", "TheatreBilling4")
  50.   set gExit = birth(script "aTheatreButton", 14, 47, "FeatureButSplClk.AIFF", "PreviousM", "HandCursor")
  51.   set gHelp = birth(script "aTheatreButton", 13, 44, "FeatureButSplClk.AIFF", "TheatreHelp", "HandCursor")
  52.   puppetsprite 17, true
  53.   set gwhichBilling = the castnum of sprite 17
  54.   set the castnum of sprite 17 = (gwhichBilling + gWhichMovieNo)
  55.   updatestage
  56.   sound stop 4
  57. end
  58.  
  59. on TheatreSetUp5
  60.   set ScriptNumber = the number of cast "aBiStableButton"
  61.   set gTBtn1 = birth(script ScriptNumber, 5, 24, "FeatureButSplClk.AIFF", "PlayMovie1", "ProjectorCursor", "TheatreBilling1")
  62.   set gTBtn2 = birth(script ScriptNumber, 6, 27, "FeatureButSplClk.AIFF", "PlayMovie2", "ProjectorCursor", "TheatreBilling2")
  63.   set gTBtn3 = birth(script ScriptNumber, 7, 30, "FeatureButSplClk.AIFF", "PlayMovie3", "ProjectorCursor", "TheatreBilling3")
  64.   set gTBtn4 = birth(script ScriptNumber, 8, 33, "FeatureButSplClk.AIFF", "PlayMovie4", "ProjectorCursor", "TheatreBilling4")
  65.   set gTBtn5 = birth(script ScriptNumber, 9, 36, "FeatureButSplClk.AIFF", "PlayMovie5", "ProjectorCursor", "TheatreBilling5")
  66.   set gExit = birth(script "aTheatreButton", 14, 47, "FeatureButSplClk.AIFF", "PreviousM", "HandCursor")
  67.   set gHelp = birth(script "aTheatreButton", 13, 44, "FeatureButSplClk.AIFF", "TheatreHelp", "HandCursor")
  68.   puppetsprite 17, true
  69.   set gwhichBilling = the castnum of sprite 17
  70.   set the castnum of sprite 17 = (gwhichBilling + gWhichMovieNo)
  71.   updatestage
  72.   sound stop 4
  73. end
  74.  
  75. on TheatreRollover
  76.   setNewFunction (gHelp, "TheatreHelp") 
  77.   if objectP (gTBtn1) then
  78.     if hilight (gTBtn1) then exit
  79.   end if
  80.   if objectP (gTBtn2) then
  81.     if hilight (gTBtn2) then exit
  82.   end if
  83.   if objectP (gTBtn3) then
  84.     if hilight (gTBtn3) then exit
  85.   end if
  86.   if objectP (gTBtn4) then
  87.     if hilight (gTBtn4) then exit
  88.   end if
  89.   if objectP (gTBtn5) then
  90.     if hilight (gTBtn5) then exit
  91.   end if
  92.   if hilight (gExit) then exit
  93.   if hilight (gHelp) then exit
  94. end
  95.  
  96. on TheatreRolloverMovie
  97.   if the movieRate of sprite 10 = 0 then
  98.     set the movieRate of sprite 10 to 1
  99.   end if
  100.   setNewFunction (gHelp, "TheatreHelpMovie") 
  101.   if objectP (gTBtn1) then
  102.     if hilight2 (gTBtn1) then exit
  103.   end if
  104.   if objectP (gTBtn2) then
  105.     if hilight2 (gTBtn2) then exit
  106.   end if
  107.   if objectP (gTBtn3) then
  108.     if hilight2 (gTBtn3) then exit
  109.   end if
  110.   if objectP (gTBtn4) then
  111.     if hilight2 (gTBtn4) then exit
  112.   end if
  113.   if objectP (gTBtn5) then
  114.     if hilight2 (gTBtn5) then exit
  115.   end if
  116.   if hilight (gExit) then exit
  117.   if hilight (gHelp) then exit
  118. end
  119.  
  120.  
  121. on PlayMovie1
  122.   set gWhichMovieNo = 1
  123.   go to frame gLastMarker
  124. end
  125.  
  126. on PlayMovie2
  127.   set gWhichMovieNo = 2
  128.   go to frame gLastMarker
  129. end
  130.  
  131. on PlayMovie3
  132.   set gWhichMovieNo = 3
  133.   go to frame gLastMarker
  134. end
  135.  
  136. on PlayMovie4
  137.   set gWhichMovieNo = 4
  138.   go to frame gLastMarker
  139. end
  140.  
  141. on PlayMovie5
  142.   set gWhichMovieNo = 5
  143.   go to frame gLastMarker
  144. end
  145.  
  146. on TheatreKill
  147.   puppetsprite 17, false
  148.   if objectP (gTBtn1) then
  149.     hidecontrol (gTBtn1)
  150.     set gTBtn1 = 0
  151.   end if
  152.   if objectP (gTBtn2) then
  153.     hidecontrol (gTBtn2)
  154.     set gTBtn2 = 0
  155.   end if
  156.   if objectP (gTBtn3) then
  157.     hidecontrol (gTBtn3)
  158.     set gTBtn3 = 0
  159.   end if
  160.   if objectP (gTBtn4) then
  161.     hidecontrol (gTBtn4)
  162.     set gTBtn4 = 0
  163.   end if
  164.   if objectP (gTBtn5) then
  165.     hidecontrol (gTBtn5)
  166.     set gTBtn5 = 0
  167.   end if
  168.   hidecontrol (gExit)
  169.   set gExit = 0
  170.   hidecontrol (gHelp)
  171.   set gHelp = 0
  172.   puppetsound 0
  173. end
  174.  
  175. on StopTheMovie
  176.   set WhichMovieNo = the castnum of sprite 10
  177.   set ghowlong = the duration of cast WhichMovieNo
  178.   if the movietime of sprite 10 < ghowlong then
  179.     go the frame
  180.   else
  181.     SetWhichLatchedFalse
  182.     set the movieRate of sprite 10 to 0
  183.     go the frame +1
  184.   end if
  185. end
  186.  
  187. on TheatreBilling1
  188.   set the castnum of sprite 17 = (gwhichBilling + 1) 
  189.   updatestage
  190. end
  191.  
  192. on TheatreBilling2
  193.   set the castnum of sprite 17 = (gwhichBilling + 2) 
  194.   updatestage
  195. end
  196.  
  197. on TheatreBilling3
  198.   set the castnum of sprite 17 = (gwhichBilling + 3) 
  199.   updatestage
  200. end
  201.  
  202. on TheatreBilling4
  203.   set the castnum of sprite 17 = (gwhichBilling + 4) 
  204.   updatestage
  205. end
  206.  
  207. on TheatreBilling5
  208.   set the castnum of sprite 17 = (gwhichBilling + 5) 
  209.   updatestage
  210. end
  211.  
  212. on TheatreHelp
  213.   if gWhatMovie = "VTheatre" then
  214.     puppetsound "SV143100.AIF"
  215.     updatestage
  216.   else
  217.     if gWhatMovie = "ATheatre" then
  218.       puppetsound "SA143100.AIF"
  219.       updatestage
  220.     else
  221.       if gWhatMovie = "ETheatre" then
  222.         puppetsound "SE143100.AIF"
  223.         updatestage
  224.       end if
  225.     end if
  226.   end if
  227. end
  228.  
  229.  
  230. on TheatreHelpMovie
  231.   SetWhichLatchedFalse
  232.   go the frame + 1
  233.   if gWhatMovie = "VTheatre" then
  234.     puppetsound "SV143100.AIF"
  235.     updatestage
  236.   else
  237.     if gWhatMovie = "ATheatre" then
  238.       puppetsound "SA143100.AIF"
  239.       updatestage
  240.     else
  241.       if gWhatMovie = "ETheatre" then
  242.         puppetsound "SE143100.AIF"
  243.         updatestage
  244.       end if
  245.     end if
  246.   end if
  247.   abort
  248. end
  249.  
  250. on clearAll
  251.   if objectP (gTBtn1) then
  252.     reset (gTBtn1)
  253.   end if
  254.   if objectP (gTBtn2) then
  255.     reset (gTBtn2)
  256.   end if
  257.   if objectP (gTBtn3) then
  258.     reset (gTBtn3)
  259.   end if
  260.   if objectP (gTBtn4) then
  261.     reset (gTBtn4)
  262.   end if
  263.   if objectP (gTBtn5) then
  264.     reset (gTBtn5)
  265.   end if
  266. end
  267.  
  268. on SetWhichLatched
  269.   if gWhichMovieNo = 1 then
  270.     setlatched(gTbtn1)
  271.   else
  272.     if gWhichMovieNo = 2 then
  273.       setlatched(gTbtn2)
  274.     else
  275.       if gWhichMovieNo = 3 then
  276.         setlatched(gTbtn3)
  277.       else
  278.         if gWhichMovieNo = 4 then
  279.           setlatched(gTbtn4)
  280.         else
  281.           setlatched(gTbtn5)
  282.         end if
  283.       end if
  284.     end if
  285.   end if
  286. end 
  287.  
  288. on SetWhichLatchedFalse
  289.   normalState(gTbtn1)
  290.   normalState(gTbtn2)
  291.   normalState(gTbtn3)
  292.   normalState(gTbtn4)
  293.   normalState(gTbtn5)
  294. end 
  295.  
  296.